package ar.edu.itba.pod.printer.impl;

public abstract class MyThread extends Thread{
	
	private boolean finish;
	
	public abstract void excecute();
	
	@Override
	public void run(){
		System.out.println("nuevo Thread");
		while(!finish){
			excecute();
		}
	}
	
	public void finish(){
		finish=true;
		System.out.println("fin de thread");
		interrupt();
	}

}
